<%@ Page Theme="BlueSkin" Title="LMS : Admin --> Hints Edit" Language="C#" MasterPageFile="~/LmsWebSite/MasterEN.master" AutoEventWireup="true" CodeFile="HintsViewEN.aspx.cs" Inherits="HintsViewEN" %>

<%@ Register src="MyCalender.ascx" tagname="MyCalender" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>
        <asp:UpdateProgress ID="uprogress1" runat="server">
            <ProgressTemplate>
            
                <div style="position:fixed;width:30px;height:30px;top:0px;right:0px;border:1px solid orange;">
                    <img src="images/loading.gif" style="width:30px;height:30px;"  alt='Loading' title='Loading'/>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    
        
<table cellspacing="5" cellpadding="5" width="100%">
        <tr>
            <td align="left" class="heading">
               Admin --> Hints Edit
            </td>
        </tr>
    </table>
    <br />
    
    <div class="aligning allWidthWithMargins  direction" style="margin-bottom:10px;margin-left:30px;margin-right:30px;">
        
        <div class="floating direction aligning" style="width:300px;">
            <asp:TextBox ID="txtSearch" runat="server" Width="300px"></asp:TextBox>
           
        </div>
        <div class="floating" style="font-size:1px;width:11px;height:1px;"></div>
        <div class="floating direction aligning" style="width:100px;">
            <asp:Button ID="btnSearch" runat="server" Text="Search" 
                onclick="btnSearch_Click" CausesValidation="false" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/>
        
        </div>
            
        
        
        <div class="clearing" style="height:10px;"></div>

        <div class="aligning allWidthWithMargins  direction">
            <asp:GridView DataKeyNames="ID" ID="grdUsers" runat="server" 
                AutoGenerateColumns="False" AllowPaging="True" 
                 onrowdeleting="grdUsers_RowDeleting" Font-Size="12px" 
                onpageindexchanging="grdUsers_PageIndexChanging" 
                onrowediting="grdUsers_RowEditing" Width="840px" 
                EnableModelValidation="True">
                
                
                <HeaderStyle HorizontalAlign="Center" />
                
                <RowStyle HorizontalAlign="Center" />

                <EmptyDataTemplate>
                <div class="aligning floating direction" style="width:840px;">
                    <asp:Label ID="Label2" runat="server" Text="Label" >No Hints found</asp:Label> 
                    <br />
                    <br />
                    
                </div>
                    
                </EmptyDataTemplate>
                <Columns>
                    <asp:TemplateField HeaderStyle-CssClass="gridRowStyle" ItemStyle-CssClass="gridRowStyle">
                        <HeaderTemplate>
                            <asp:Label ID="lblHintTitleARHead" runat="server" Text="Arabic Title" Width="120px" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <asp:Label ID="lblHintTitleARItem" runat="server" Text='<%#  Eval ("HintTitleAR") %>' Width="120px" style="margin-top:10px;margin-bottom:10px;"></asp:Label>
                                                     
                        </ItemTemplate>
                        <HeaderStyle CssClass="gridRowStyle" />
                        <ItemStyle CssClass="gridRowStyle" />
                    </asp:TemplateField>
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblHintTitleENHead" runat="server" Text="English Title" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblHintTitleENItem" runat="server" Text='<%#  Eval ("HintTitleEN") %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                   
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblHintImageHead" runat="server" Text="Hint Image" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            
                           <div style='<%# Eval("HintImage").ToString() == ""?"width:1px;height:1px;font-size:1px;":"width:100px;height:100px;background:url(\"getImage.ashx?image=HintsImages/" + Eval("HintImage").ToString()  + "&w=100&h=100&color=white\") no-repeat;"%>'></div> 
                           
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                   
                   
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="lblHintDateHead" runat="server" Text="Hint date" Width="120px"></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           <asp:Label ID="lblHintDateItem" runat="server" Text='<%#  Eval ("HintDate","{0:dd/MM/yyyy}") %>' Width="120px"></asp:Label>
                                                     
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    
                    <asp:TemplateField>
                        <HeaderTemplate>
                                <asp:Label ID="lblActionsHead" runat="server" Text="Action" ></asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                           
                                <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="false" CommandName="Edit" CommandArgument='<%# Container.DataItemIndex %>'   Text="Edit"></asp:LinkButton>
                          
                                &nbsp;&nbsp;
                                
                                 <asp:LinkButton ID="lnkDelete" runat="server" CommandName="Delete" CommandArgument='<%# Container.DataItemIndex %>' OnClientClick="javascript:return confirm ('Do you really want to delete this hint ?');"   Text="Delete" CausesValidation="false"></asp:LinkButton>
                                  
                                                 
                        </ItemTemplate>
                        
                        
                    </asp:TemplateField>
                    
                    
                    
                    
                    
                        
                           
                        
               
                
                
                
                </Columns>
                
                
            </asp:GridView>
        </div>
        
        
        
        
        <div class="clearing" style="width:1px;height:20px;"></div>
        
        
        <div class="allWidthWithMargins " style="font-size:14px;">
        
         <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblHintTitleAR" runat="server" Text="Arabic Title *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtHintTitleAR" runat="server" Text="" style="width:250px;"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           <asp:RequiredFieldValidator ID="rfvHintTitleAR" runat="server" ErrorMessage="You must enter an arabic title" ControlToValidate="txtHintTitleAR">*</asp:RequiredFieldValidator>
        </div>
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblHintTitleEN" runat="server" Text="English Title *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtHintTitleEN" runat="server" Text="" style="width:250px;"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           <asp:RequiredFieldValidator ID="rfvHintTitleEN" runat="server" ErrorMessage="You must enter an english title" ControlToValidate="txtHintTitleEN">*</asp:RequiredFieldValidator>
        </div>
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
        
        
        
         <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblHintDetailsAR" runat="server" Text="Arabic Details"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtHintDetailsAR" runat="server" Text="" style="width:250px;height:100px;overflow:scroll;" TextMode="MultiLine"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           
        </div>
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblHintDetailsEN" runat="server" Text="English Details"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtHintDetailsEN" runat="server" Text="" style="width:250px;height:100px;overflow:scroll;" TextMode="MultiLine"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           
        </div>
        
        
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblHintDate" runat="server" Text="Hint date"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           
           <uc1:MyCalender ID="calenderHintDate" runat="server" />
           
        </div>  
       <div class="floating aligning direction" >
           <asp:CustomValidator ID="cvHintDate" runat="server" ErrorMessage="Error the date format is not correct"  OnServerValidate="cvHintDate_ServerValidate">*</asp:CustomValidator>
        </div>
        
        
        
        <div class="clearing" style="height:10px;width:1px;"></div>
        
        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblHintImage" runat="server" Text="Hint Image"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
            <asp:Label ID="lblHintImageValue" runat="server" Text="" Visible="false"></asp:Label>
           <asp:FileUpload ID="fuImage" runat="server" style="width:250px;" />
           <div class="clearing"></div>
           <div class="floating" style="width:100px;height:100px;">
                <a id="lnkImage" runat="server" href=""><img id="imgHint" runat="server" src='' title="Current image" alt="Current image" style="border:none;" /></a>
                 <div class="clearing"></div>     
           </div>
           <div class="clearing"></div>        
        </div>  
       <div class="floating aligning direction" >
           
        </div>
        
        
        
        <div class="clearing" style="width:1px;height:30px;"></div>
        
        <div class="floating direction" style="width:500px;text-align:right">
            
            <div style="float:right;"><asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/></div>
            <div style="float:right;font-size:1px;width:5px;height:1px;"></div>
            <div style="float:right;">
                <asp:Button ID="btnDelete" runat="server" Text="Delete" 
                OnClientClick="javascript:return confirm('Are you sure , you want to delete this hint ?');" 
                onclick="btnDelete_Click" style="height: 26px" CausesValidation="false" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/></div>
            <div style="float:right;font-size:1px;width:5px;height:1px;"></div>
            
            <div style="float:right;">
                <asp:Button ID="btnNew" runat="server" Text="New" 
                 onclick="btnNew_Click" CausesValidation="false" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/>
            </div>
           
            
            <div class="clearing"></div>
            
        
        </div>
        
        <div class="clearing" style="width:1px;height:20px;"></div>
        
        <div class="allWidthWithMargins  direction" style="text-align:right;">
            
        </div>
        
        
        <div class="clearing"></div>
        
        <div class="aligning allWidthWithMargins  direction">
            <asp:Label ID="lblError" runat="server" Text="" ForeColor="Red" style="margin-left:30px;" EnableViewState ="false"></asp:Label>
            <div class="clearing"></div>
            <asp:Label ID="lblResult" runat="server" Text="" ForeColor="Green" style="margin-left:30px;" EnableViewState="false"></asp:Label>
            
            <div class="clearing"></div>
        </div>
        
        <div class="clearing"></div>
        <div class="aligning allWidthWithMargins  direction">
            <asp:ValidationSummary ID="vsError" runat="server" />
            
            <div class="clearing"></div>
        </div>
        
        <div class="clearing"></div>
      </div>  
      
      <div class="clearing"></div>
    </div>
    
    
    
    <div class="clearing"></div>
    </ContentTemplate>
    
    <Triggers>
        <asp:PostBackTrigger ControlID="btnSave" />
    
    </Triggers>
    
    </asp:UpdatePanel>
</asp:Content>

